@mixin light {
  --other-msg-color: rgba(0, 0, 0, .05);
  --self-msg-color: #e7f8ff;
  // 整体hover图标的样式
  --icon-hover-color: #00000008;

  --tags-back-hover: rgb(0, 0, 0, 0.12);
  --tags-back: rgb(0, 0, 0, 0.06);

  --white: white;
  --black: rgb(48, 48, 48);
  --gray: rgb(250, 250, 250);
  --primary: rgb(29, 147, 171);
  --second: rgb(231, 248, 255);

  /* color */
  --navbar-background: rgba(244, 244, 244);
  --color-card: rgba(0, 0, 0, 0.12);
  --color-tags-active-back: #222;
  --color-tags-active: #f8f8f8;
  --color-tags-color: #333333;
  --color-tags-back: rgba(0, 0, 0, 0.12);
  --color-robot-model: #fff;
  --color-body-bg: #ffffff;
  --color-text: #000;
  --color-text-tags: rgba(0, 0, 0, 0.03);
  --color-text-default: #442c2c;
  --color-primary-bg: #eaeffd;
  --color-navbar-bg: rgba(255, 255, 255, 0.86);
  --color-icon-hover: #409eff;
  --color-border-default: #d0d7de;
  --color-message-active: #a7bcd224;
  --color-border-color-split: #f2f4f7;
  --color-time-divider: rgba(0, 0, 0, 0.45);
  --color-message-chat-name: rgba(0, 0, 0, 0.85);
  --color-draggable-body: #f5f5f5;
  --color-range: #fff;
  --color-multiple-choice: hsl(220deg 20% 91%);
  --color-mention-active: #f0f2f5;
}

@mixin dark {
  --other-msg-color: #000;
  --self-msg-color: #000;
  // 整体hover图标的样式
  --icon-hover-color: #ffffff0f;

  --tags-back-hover: rgba(255, 255, 255, 0.16);
  --tags-back: rgba(255, 255, 255, 0.10);

  --white: rgb(30, 30, 30);
  --black: rgb(187, 187, 187);
  --gray: rgb(21, 21, 21);
  --primary: rgb(29, 147, 171);
  --second: rgb(27 38 42);

  /* color */
  --navbar-background: #1f1f1f;
  --color-card: rgba(255, 255, 255, 0.10);
  --color-tags-active: #000000;
  --color-tags-active-back: #eeeeee;
  --color-tags-color: #ffffff;
  --color-tags-back: rgb(34, 34, 34);
  --color-robot-model: #333;
  --color-body-bg: #222222;
  --color-text: #fff;
  --color-text-tags: #111111;
  --color-text-default: #fff;
  --color-border-color-split: #252431;
  --color-primary-bg: #bbcdff;
  --color-navbar-bg: rgba(34, 34, 34, 0.86);
  --color-message-active: rgba(255, 255, 255, 0.10);
  --color-border-default: #30363d;
  --color-time-divider: #fff;
  --color-message-chat-name: #fff;
  --color-draggable-body: rgba(0, 0, 0, 0.85);
  --color-range: #141414;
  --color-multiple-choice: #333;
  --color-mention-active: #333;

  // wangEditor
  --w-e-textarea-bg-color: reg(27, 27, 27);
  --w-e-textarea-color: #fff;
  --w-e-textarea-slight-bg-color: #333;
}

@mixin lightMarkdown {
  --color-border-in-light: 1px solid #dedede;
  --color-hljs-color: #f8f8f8;
  --color-prettylights-syntax-comment: #6e7781;
  --color-prettylights-syntax-constant: #0550ae;
  --color-prettylights-syntax-entity: #8250df;
  --color-prettylights-syntax-storage-modifier-import: #24292f;
  --color-prettylights-syntax-entity-tag: #116329;
  --color-prettylights-syntax-keyword: #cf222e;
  --color-prettylights-syntax-string: #0a3069;
  --color-prettylights-syntax-variable: #953800;
  --color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
  --color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
  --color-prettylights-syntax-invalid-illegal-bg: #82071e;
  --color-prettylights-syntax-carriage-return-text: #f6f8fa;
  --color-prettylights-syntax-carriage-return-bg: #cf222e;
  --color-prettylights-syntax-string-regexp: #116329;
  --color-prettylights-syntax-markup-list: #3b2300;
  --color-prettylights-syntax-markup-heading: #0550ae;
  --color-prettylights-syntax-markup-italic: #24292f;
  --color-prettylights-syntax-markup-bold: #24292f;
  --color-prettylights-syntax-markup-deleted-text: #82071e;
  --color-prettylights-syntax-markup-deleted-bg: #ffebe9;
  --color-prettylights-syntax-markup-inserted-text: #116329;
  --color-prettylights-syntax-markup-inserted-bg: #dafbe1;
  --color-prettylights-syntax-markup-changed-text: #953800;
  --color-prettylights-syntax-markup-changed-bg: #ffd8b5;
  --color-prettylights-syntax-markup-ignored-text: #eaeef2;
  --color-prettylights-syntax-markup-ignored-bg: #0550ae;
  --color-prettylights-syntax-meta-diff-range: #8250df;
  --color-prettylights-syntax-brackethighlighter-angle: #57606a;
  --color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
  --color-prettylights-syntax-constant-other-reference-link: #0a3069;
  --color-fg-default: #24292f;
  --color-fg-muted: #57606a;
  --color-fg-subtle: #6e7781;
  --color-canvas-default: transparent;
  --color-canvas-subtle: #f6f8fa;
  --color-border-muted: hsla(210, 18%, 87%, 1);
  --color-neutral-muted: rgba(175, 184, 193, 0.2);
  --color-accent-fg: #0969da;
  --color-accent-emphasis: #0969da;
  --color-attention-subtle: #fff8c5;
  --color-danger-fg: #cf222e;
}

@mixin darkMarkdown {
  --color-border-in-light: 1px solid hsla(0, 0%, 100%, .192);
  --color-hljs-color: #1a1b26;
  --color-prettylights-syntax-comment: #8b949e;
  --color-prettylights-syntax-constant: #79c0ff;
  --color-prettylights-syntax-entity: #d2a8ff;
  --color-prettylights-syntax-storage-modifier-import: #c9d1d9;
  --color-prettylights-syntax-entity-tag: #7ee787;
  --color-prettylights-syntax-keyword: #ff7b72;
  --color-prettylights-syntax-string: #a5d6ff;
  --color-prettylights-syntax-variable: #ffa657;
  --color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
  --color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
  --color-prettylights-syntax-invalid-illegal-bg: #8e1519;
  --color-prettylights-syntax-carriage-return-text: #f0f6fc;
  --color-prettylights-syntax-carriage-return-bg: #b62324;
  --color-prettylights-syntax-string-regexp: #7ee787;
  --color-prettylights-syntax-markup-list: #f2cc60;
  --color-prettylights-syntax-markup-heading: #1f6feb;
  --color-prettylights-syntax-markup-italic: #c9d1d9;
  --color-prettylights-syntax-markup-bold: #c9d1d9;
  --color-prettylights-syntax-markup-deleted-text: #ffdcd7;
  --color-prettylights-syntax-markup-deleted-bg: #67060c;
  --color-prettylights-syntax-markup-inserted-text: #aff5b4;
  --color-prettylights-syntax-markup-inserted-bg: #033a16;
  --color-prettylights-syntax-markup-changed-text: #ffdfb6;
  --color-prettylights-syntax-markup-changed-bg: #5a1e02;
  --color-prettylights-syntax-markup-ignored-text: #c9d1d9;
  --color-prettylights-syntax-markup-ignored-bg: #1158c7;
  --color-prettylights-syntax-meta-diff-range: #d2a8ff;
  --color-prettylights-syntax-brackethighlighter-angle: #8b949e;
  --color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
  --color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
  --color-fg-default: #c9d1d9;
  --color-fg-muted: #8b949e;
  --color-fg-subtle: #6e7681;
  --color-canvas-default: transparent;
  --color-canvas-subtle: #161b22;
  --color-border-muted: #21262d;
  --color-neutral-muted: rgba(110, 118, 129, 0.4);
  --color-accent-fg: #58a6ff;
  --color-accent-emphasis: #1f6feb;
  --color-attention-subtle: rgba(187, 128, 9, 0.15);
  --color-danger-fg: #f85149;
}

.light {
  @include light;
  @include lightMarkdown;
}

.dark {
  @include dark;
  @include darkMarkdown;
}

:root {
  @include light;
  @include lightMarkdown;
}

[data-theme="dark"] {
  @include dark;
  @include darkMarkdown;
}